<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>AUI快速完成布局</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />

</head>

<body>


  <div class="aui-content" style="background:#fff">
      <div class="aui-row" style="padding:10px;text-align:center">
          <div class="aui-col-xs-4">
              <img src="../image/demo1.png" style="width:80px;height:80px;display:inline;">
          </div>
          <div class="aui-col-xs-8" style="text-align:left;line-height:25px;padding-top:10px">
              <h3>支付宝</h3>
              <h3>赵姐</h3>
          </div>
      </div>
  </div>
  <div style="background-color:#f8f8f8;line-height:10px;padding:14px 20px;">平台支持提现到支付宝</div>
  <div class="aui-content" style="background:#fff;line-height:50px;text-align:left;">
      <div class="aui-row">
          <div class="aui-col-xs-5" style="padding-left:20px;">
              到账时间
          </div>
          <div class="aui-col-xs-7">
              3个工作日，vip尊享，免手续费
          </div>
      </div>
  </div>
  <div style="background-color:#f8f8f8;line-height:10px;padding:14px 20px;">可提现金额：<span style="color:red;">16.78</span>元</div>
  <div class="aui-content" style="background:#fff;line-height:50px;text-align:left;border:1px solid #ccc;">
      <div class="aui-row">
          <div class="aui-col-xs-3" style="padding-left:20px;">
              提现金额:
          </div>
          <div class="aui-col-xs-9">
              <input type="text" placeholder="输入提现金额，最低1元" >
          </div>
      </div>
  </div>
  <div style="background-color:#f8f8f8;line-height:10px;padding:14px 20px;">手续费，最终到账</div>
  <div style="background-color:#fff;line-height:30px;padding:14px 20px;">
      <h3 style="color:#ff4285;">温馨提醒:</h3>
      <p  style="text-indent:1rem;">1.提现金额需是整数,最少是1的1倍。</p>
      <p style="text-indent:1rem;">2.非工作时间内，国家法定节假日，不受理快速提现申请</p>
      <p style="text-indent:1rem;">3.非工作时间内的快速提现申请，上班之后第一时间处理。</p>
  </div>

  <div style="height:60px;background:#ff4285;margin:20px;border-radius:10px;color:#fff;font-size:20px;text-align:center;line-height:60px;">
    确认申请
  </div>






</body>

<script type="text/template" id="template">
    {{~it:value:index}}
    <div class="aui-content" style="background:#fff;margin-top:5px;padding:5px 0;">
        <div class="aui-row">
            <div class="aui-col-xs-7" style="padding:5px 20px;text-align:left;">
                <span style="color:red">时间:</span>{{= userDate(value.dateline)}}
            </div>
            <div class="aui-col-xs-5" style="padding:5px 20px;">
                <span style="color:green">收入:{{= value.num}}</span>
            </div>
            <div class="aui-col-xs-12" style="padding:5px 20px;text-align:left;">
                <span style="color:red">备注：</span>{{= value.cause}}
            </div>
        </div>

    </div>
    {{~}}
</script>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="./conf/config.js"></script>
<script type="text/javascript" src="./js/common.js"></script>
<script type="text/javascript" src="../script/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="../script/doT.min.js"></script>
<script type="text/javascript">
    apiready = function() {

        fnGetData(); //获取用户信息分配到模板
        //initRefresh() ;//下拉

    };
    function userDate(uData){
      var myDate = new Date(uData*1000);
      var year = myDate.getFullYear();
      var month = myDate.getMonth() + 1;
      var day = myDate.getDate();
      var hours = myDate.getHours();
      var minutes = myDate.getMinutes();
      return year + '-' + month + '-' + day+" "+hours+":"+minutes;
    }


    function  fnGetData() {
        var userInfo = $api.getStorage("userInfo");
        var userid = userInfo.userid;
        var random = userInfo.random;
        api.ajax({
            url: SITE_URL+'index.php?m=api&c=appnew&a=getfinancelog',
            method: 'get',
            data: {
                values: {
                    "userid": userid,
                    "random": random,
                    "type": 2,
                }
            }
        }, function(ret, err) {
            fnUpdata(ret);
          //alert(JSON.stringify(ret));

        });
    };
    //把数据分配到模板上面

    function  fnUpdata(ret) {
        //数组分配到模板；
        var list = $api.byId('list'); //获取节点
        //var str={"array":["banana","apple","orange"]};
        // 1. 编译模板函数
        var tempFn = doT.template($api.byId('template').innerHTML); //找到模板多次使用
        // 2. 多次使用模板函数
        var resultText = tempFn(ret.lists);

        $api.html(list, resultText);

    }


    function initEventListenner() {

        api.addEventListener({
            name: 'keyback'
        }, function(ret, err) {
            api.closeWin();
        });
    };



</script>

</html>
